<?php 
$isadmin=1;
include '../comm/config.php';
include 'check.php';
include '../comm/class_db.php';
$id=$_GET['id'];
$nav=sel_sql('nav','*','id='.$id);

/*$url = 'http://'.$_SERVER['SERVER_NAME'].':'.$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
$url_arr=explode('/',$url);
$c=count($url_arr);
for($i=0;$i<$c-2;$i++){
    $u=$u.$url_arr[$i].'/';
}*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理中心</title>
<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/facebox.js" type="text/javascript"></script>
<link href="http://soft.duoduo123.com/remote/facefiles/facebox.css" media="screen" rel="stylesheet" type="text/css" />
<link href="css/style.css" rel="stylesheet" type="text/css">
<script>
$(function(){
     $('a[rel*=facebox]').facebox();
})
</script>
<style type="text/css">
<!--
.STYLE3 {color: #FF0000}
-->
</style>
</head>

<body topmargin="5" leftmargin="0">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="282" valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td>
          <table cellspacing="0" width="100%" height="207" style="border:1px  solid #DCEAF7;">
            <tr>
              <td height="30" colspan="2" bgcolor="E9F2FB" class="bigtext"><strong>&nbsp;<img src="images/arrow.gif" width="16" height="22" align="absmiddle" /> 添加站点导航</strong></td>
            </tr>
            <tr>
              <td width="100%" colspan="2" valign="top"><table width="100%" height="300" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td valign="top"><form id="form1" name="form1" method="post" action="savenav.php">
                    <br />
                    <table width="100%"  align="center" border=1 cellpadding=0 cellspacing=0 style="border-collapse: collapse" bordercolor="#dddddd">
                      <tr>
                        <td height="30" width="10%" align="right" class="bigtext">排序：</td>
                        <td height="0" class="bigtext">
                          &nbsp;<input name="info[sort]" type="text" id="sort" value="<?=$nav['sort']?>" style="width:30px"/>&nbsp;数字越大越靠前</td>
                      </tr>
                      <tr>
                        <td height="30" align="right" class="bigtext">名称：</td>
                        <td height="0" class="bigtext">
                          &nbsp;<input name="info[name]" type="text" id="name" value="<?=$nav['name']?>"/></td>
                      </tr>
                      <tr>
                        <td height="30" align="right" class="bigtext">显示状态：</td>
                        <td height="0" class="bigtext">
                          &nbsp;<select name="info[hide]">
                          <option <?php if($nav['hide']==0){?> selected="selected" <?php }?> value="0">显示</option>
                          <option <?php if($nav['hide']==1){?> selected="selected" <?php }?> value="1">隐藏</option>
                          </select>
                        </td>
                      </tr>
                      <tr>
                        <td height="30" align="right" class="bigtext">导航方式：</td>
                        <td height="0" class="bigtext">
                          &nbsp;<select name="info[target]">
                          <option <?php if($nav['target']==0){?> selected="selected" <?php }?> value="0">进入试</option>
                          <option <?php if($nav['target']==1){?> selected="selected" <?php }?> value="1">弹出试</option>
                          </select>&nbsp;点击导航后网页的显示方式
                        </td>
                      </tr>
                      <tr>
                        <td height="30" align="right" class="bigtext">链接：</td>
                        <td height="0" class="bigtext">
                          &nbsp;<input name="info[link]" type="text" id="link" value="<?=$nav['link']?>" style="width:400px"/>&nbsp;链接必须以http://开头
                        </td>
                      </tr>
                      <tr>
                        <td height="30" align="right" class="bigtext">tag标记：</td>
                        <td height="0" class="bigtext">&nbsp;<input name="info[tag]" type="text" id="tag" value="<?=$nav['tag']?>" style="width:60px"/> <a href="#mydiv" rel="facebox" style="color:#F00; font-weight:bold; text-decoration:underline" >tag标记说明</a>
                        </td>
                        </tr>
                      <tr>
                        <td height="30" align="right">&nbsp;</td>
                        <td height="30" class="bigtext">&nbsp;
						<input type="submit" name="Submit" value=" 保 存 " /> 注意：必须在基本设置中填写网站URL</td>
                      </tr>
                    </table>
                    <input type="hidden" name="info[id]" value="<?=$nav['id']?>" />
                  </form>
                  </td>
                </tr>
              </table></td>
            </tr>
          </table></td>
        </tr>
      
    </table></td>
  </tr>
</table>
<div id="mydiv" style="display:none; font:12px; color:#666666;">
<p>每个导航都需要一个tag标记</p>
<table width="400" border="1">
  <tr>
    <th scope="col">页面</th>
    <th scope="col">tag标记</th>
  </tr>
  <tr>
    <td>index.php</td>
    <td>index</td>
  </tr>
  <tr>
    <td>list.php</td>
    <td>list</td>
  </tr>
  <tr>
    <td>malllist.php(所有商城相关页面)</td>
    <td>malllist</td>
  </tr>
  <tr>
    <td>shoplist.php</td>
    <td>shoplist</td>
  </tr>
  <tr>
    <td>coupons.php</td>
    <td>coupons</td>
  </tr>
  <tr>
    <td>huan.php(兑换相关页面)</td>
    <td>huan</td>
  </tr>
  <tr>
    <td>sitemap.php</td>
    <td>sitemap</td>
  </tr>
  <tr>
    <td>artilce.php(所有文章相关页面)</td>
    <td>artilce</td>
  </tr>
  <tr>
    <td>fanxianbao/</td>
    <td>fanxianbao</td>
  </tr>
  <tr>
    <td>user(用户中心)</td>
    <td>center</td>
  </tr>
  <tr>
    <td>站外链接</td>
    <td>无需tag标记</td>
  </tr>
</table>

</div>
</body>
</html>
<?php mysql_close();?>
